]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NotificationDaemon: don't override the title for app notifications
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 6 Aug 2012 14:34:20 +0000 (16:34 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 6 Aug 2012 21:07:11 +0000 (23:07 +0200)
If a source is associated with an app, ignore the app name provided
by libnotify, as that is often garbage.
This fixes the "XChat-GNOME OSD" problem.

https://bugzilla.gnome.org/show_bug.cgi?id=681143

js/ui/notificationDaemon.js

index 8fdb9e02247bbeec47069dde7e915db3fda7ad09..0eee59b87ec57b438b3b74470dfa05c3a3da72b6 100644 (file)
@@ -629,6 +629,16 @@ const Source = new Lang.Class({
         }
     },
 
+    setTitle: function(title) {
+        // Do nothing if .app is set, we don't want to override the
+        // app name with whatever is provided through libnotify (usually
+        // garbage)
+        if (this.app)
+            return;
+
+        this.parent(title);
+    },
+
     open: function(notification) {
         this.destroyNonResidentNotifications();
         this.openApp();